<?php
/**
 * +----------------------------------------------------------------------
 * | summer framework
 * +----------------------------------------------------------------------
 * | Copyright (c) 2020 https://github.com/suframe/think-admin All rights reserved.
 * +----------------------------------------------------------------------
 * | Author: summer <806115620@qq.com>  2020/3/30 13:55
 * +----------------------------------------------------------------------
 */

namespace app\mall\enum;


class YesNoEnum extends Base
{

    public const YES = 1; //是
    public const NO = 2; //否

    public static function toZhArray(): array
    {
        return [
            self::YES => '是',
            self::NO => '否',
        ];
    }

    public static function getYes()
    {
        return static::YES;
    }

    public static function getNo()
    {
        return static::NO;
    }

    public function isYes()
    {
        return $this->getValue() == self::YES;
    }

}